var dbOptimizeTask = new ScheduledTask('Optimize Database', '0 0 0 ? * SAT', "mgr.doMaintenance();");
var searchOptimizeTask = new ScheduledTask('Optimize Search Index', '0 0 22 ? * *', "searcher.optimize();");
dbOptimizeTask.setSystem(true);
searchOptimizeTask.setSystem(true);
updater.insert(dbOptimizeTask);
updater.insert(searchOptimizeTask);